import request from '@/utils/request'

// 查询储值管理列表
export function listValuestorage(query) {
  return request({
    url: '/membership/valuestorage/list',
    method: 'get',
    params: query
  })
}

export function chongzhidialog(formcz){
  return request({
    url: '/membership/recharge/add',
    method: 'post',
    params: {
      zengjiaJine: formcz.zengjiaJine,
      patientId: formcz.patientId
    }
  })
}

//退款
export function  tuikuandialog(formcz){
  return request({
    url: '/membership/recharge/less',
    method: 'post',
    params: {
      jianshaoJine: formcz.jianshaoJine,
      patientId: formcz.patientId
    }
  })
}


//充值前查询
// export function chonghziqianchaxun(query){
//   return request({
//     url:'/membership/valuestorage/chongzhiqianchaxun',
//     method:'get',
//     params:query
//   })
// }

// 查询储值管理详细
export function getValuestorage(storageId) {
  return request({
    url: '/membership/valuestorage/' + storageId,
    method: 'get'
  })
}




// 新增储值管理
export function addValuestorage(data) {
  return request({
    url: '/membership/valuestorage',
    method: 'post',
    data: data
  })
}

// 修改储值管理
export function updateValuestorage(data) {
  return request({
    url: '/membership/valuestorage',
    method: 'put',
    data: data
  })
}

// 删除储值管理
export function delValuestorage(storageId) {
  return request({
    url: '/membership/valuestorage/' + storageId,
    method: 'delete'
  })
}
